package com.xihu.credit.controller;

import com.xihu.credit.service.UserAuthService;
import com.xihu.credit.entity.UserAuth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.util.Map;

@RestController
@RequestMapping("/user")
public class UserAuthController {

    @Autowired
    private UserAuthService userAuthService;

    /**
     * 提交实名认证信息
     * @param userAuth 用户认证信息
     * @return 提交结果
     */
    @PostMapping("/auth")
    public Map<String, Object> submitAuth(@RequestBody UserAuth userAuth) {
        System.out.println(userAuth.getUserId());
        userAuth.setLatitude(30);
        userAuth.setLongitude(20);
        Map<String, Object> result = userAuthService.submitAuth(userAuth);
        return result;
    }

}
